package com.xique.door.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xique.door.bean.dao.BuildingDeviceDAO;
import com.xique.door.bean.domain.BuildingDevice;
import com.xique.door.bean.search.build.BuildingDeviceListSearch;

import java.util.List;

/**
 * @author: caogq
 * @Date: 2022/1/28 15:33
 * @Description:
 */
public interface BuildingDeviceMapper extends BaseMapper<BuildingDevice>
{
    /**
     * 查询楼栋设备中间
     *
     * @param id 楼栋设备中间ID
     * @return 楼栋设备中间
     */
    public BuildingDevice selectBuildingDeviceById(Long id);

    /**
     * 查询楼栋设备中间列表
     *
     * @param buildingDevice 楼栋设备中间
     * @return 楼栋设备中间集合
     */
    public List<BuildingDevice> selectBuildingDeviceList(BuildingDevice buildingDevice);

    /**
     * 新增楼栋设备中间
     *
     * @param buildingDevice 楼栋设备中间
     * @return 结果
     */
    public int insertBuildingDevice(BuildingDevice buildingDevice);

    /**
     * 修改楼栋设备中间
     *
     * @param buildingDevice 楼栋设备中间
     * @return 结果
     */
    public int updateBuildingDevice(BuildingDevice buildingDevice);

    /**
     * 删除楼栋设备中间
     *
     * @param id 楼栋设备中间ID
     * @return 结果
     */
    public int deleteBuildingDeviceById(Long id);

    /**
     * 批量删除楼栋设备中间
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteBuildingDeviceByIds(String[] ids);

    /**
     * 批量插入楼栋设备信息
     * @author shd
     * @date 2022/1/29 15:32
     * @param list
     * @return int
     */
    int insertBuildingDevices(List<BuildingDevice> list);

    /**
     * 获取楼栋设备信息列表
     * @author shd
     * @date 2022/4/20 13:40
     * @param search
     * @return java.util.List<com.xique.door.bean.dao.BuildingDeviceDAO>
     */
    List<BuildingDeviceDAO> selectBuildingDeviceListWithDeviceInfo(BuildingDeviceListSearch search);

    /**
     * @param id
     * @description: 根据设备id删除楼栋设备中间表信息
     * @author taojc
     * @date: 2022/8/16
     */
    void deleteBuildingDeviceListWithDeviceInfo(Long id);
}
